from google.appengine.ext import db
import logging as log

class Attachment(db.Model):
    sender = db.StringProperty()
    to = db.StringProperty()
    domain = db.StringProperty()
    file_name = db.StringProperty()
    subject = db.StringProperty()
    update_time = db.DateTimeProperty()
    parts = db.IntegerProperty()
    saved_parts = db.IntegerProperty()

class AttachmentData(db.Model):
    file_name = db.StringProperty(required=True)
    data = db.BlobProperty(required=True)
    order = db.IntegerProperty(required=True)
    total = db.IntegerProperty(required=True)
    size = db.IntegerProperty(required=True)

class AttachmentTag(db.Model):
    tag_name = db.StringProperty(required=True)
    file_list = db.StringListProperty()
